// 缓存ukey
import $http from '../requer_center/index'

export default async function(ctx:any, next:any){
    
    const ukey = ctx.params.ukey;

    // 配置ukey
    $http.defaults.params['ukey'] = ukey;

    // 缓存ukey
    sessionStorage.setItem('ukey', ukey);
    
    // 提取登录用户数据
    ctx.params = ctx.params.info;
    
    next()
}